import { alert } from './alert'

function assertLogin() {
  return new Promise(resolve => {
    if(!window.sessionStorage.getItem('isLogin')) {
      alert({
        type: 'error',
        content: '请先登录'
      }).then(() => {
        resolve(false);
      });
    }
    else resolve(true);
  })
}

export {
  assertLogin
}